import lasio

# 读取LAS文件
las = lasio.read('C://Users//21025//Desktop//gamma.las')

# 打印井信息 (Well Information)
print("Well Information:")
for key, value in las.well.items():
    print(f"{key}: {value.value} ({value.descr})")

# 打印曲线信息 (Curve Information)
print("\nCurve Information:")
for curve in las.curves:
    print(f"MNemonic: {curve.mnemonic}, Description: {curve.descr}, Units: {curve.unit}")

# 打印部分数据记录 (Data Records)
print("\nData Preview (first 5 records):")
print(las.df().head())  # 使用pandas DataFrame来展示数据